﻿#include "UserRegisterCodec_Unregister.h"

#include "RegisterCenter_User.h"
#include "qdebug.h"

UserRegisterCodec_Unregister::UserRegisterCodec_Unregister()
{
setObjectName(getClassNameFirstLow<UserRegisterCodec_Unregister>());
}

UserRegisterCodec_Unregister::~UserRegisterCodec_Unregister()
{

}

DataPackage_UserRegisterCodec* UserRegisterCodec_Unregister::decode(DataPackage_UserRegisterCodec*  dataPackage_UserRegisterCodec)
{
  registerCenter_User->userLogout(dataPackage_UserRegisterCodec->getTcpIOer());
  return Q_NULLPTR;
}

RegisterCenter_User* UserRegisterCodec_Unregister::getRegisterCenter_User()const
{
  return registerCenter_User;
}

UserRegisterCodec_Unregister* UserRegisterCodec_Unregister::setRegisterCenter_User(RegisterCenter_User* const registerCenter_User)
{
  this->registerCenter_User=registerCenter_User;
  printInjection(this,registerCenter_User);
  return this;
}

void UserRegisterCodec_Unregister::objectAutoInjection(QHash<QString,QObject*>* objMap)
{
  setRegisterCenter_User(getObjFromMap<RegisterCenter_User>(objMap));
}
